export default (_self, h) => {
  return [
    h(
      "el-radio-group",
      {
        props: {
          value: _self.obj.value || "1"
        },
        on: {
          input(value) {
            // if (!_self.obj.name) {
            //   return false;
            // }
            _self.obj = Object.assign(_self.obj, {
              value
            });
            _self.$emit("handleChangeVal", value);
          }
        }
      },
      _self.obj.items.map(v => {
        return h(
          "el-radio",
          {
            props: {
              label: v.label_value
            }
          },
          v.label_name
        );
      })
    )
  ];
};

export let radioConf = {

  label: "单选框",

  value: "",
  name:"radio",
  items: [
    { label_value: "1", label_name: "单选框1" },
    { label_value: "2", label_name: "单选框2" }
  ],

  name:"radio",
  
  rules:[{ required: true, message: '请选择', trigger: 'change' }]
};
